home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Visual Basic Source Code
/
Visual Basic Source Code.iso
/
vbsource
/
winview
/
winview.bas
< prev
next >
Wrap
BASIC Source File
|
1999-09-15
|
14KB
|
410 lines
Attribute VB_Name = "WINVIEW1"
Option Explicit
'-------------------------------------------------------
' Application global contstants
'-------------------------------------------------------
'-------------------------------------------------------
' API type definitions
'-------------------------------------------------------
Type POINTAPI
x As Long
y As Long
End Type
Type RECT
Left As Long
Top As Long
Right As Long
Bottom As Long
End Type
Public Type OSVERSIONINFO
dwOSVersionInfoSize As Long
dwMajorVersion As Long
dwMinorVersion As Long
dwBuildNumber As Long
dwPlatformId As Long
szCSDVersion As String * 128
End Type
'-------------------------------------------------------
' API constants
'-------------------------------------------------------
Public Const LVM_FIRST = &H1000
Public Const LVM_SETEXTENDEDLISTVIEWSTYLE = LVM_FIRST + 54
Public Const LVM_GETEXTENDEDLISTVIEWSTYLE = LVM_FIRST + 55
Public Const LVM_GETHEADER = (LVM_FIRST + 31)
Public Const LVS_EX_FULLROWSELECT = &H20
Public Const LVS_EX_GRIDLINES = &H1
Public Const LVS_EX_HEADERDRAGDROP = &H10
Public Const LVS_EX_TRACKSELECT = &H8
Public Const LVS_EX_ONECLICKACTIVATE = &H40
Public Const LVS_EX_TWOCLICKACTIVATE = &H80
' Straight port to Win32. The old GWW and GCW constants are gone
Public Const GWL_WNDPROC = (-4)
Public Const GWL_HINSTANCE As Long = (-6)
Public Const GWL_HWNDPARENT = (-8)
Public Const GWL_STYLE = (-16)
Public Const GWL_EXSTYLE = (-20)
Public Const GWL_USERDATA = (-21)
Public Const GWL_ID = (-12)
Public Const GCL_MENUNAME = (-8)
Public Const GCL_HBRBACKGROUND = (-10)
Public Const GCL_HCURSOR = (-12)
Public Const GCL_HICON = (-14)
Public Const GCL_HMODULE = (-16)
Public Const GCL_CBWNDEXTRA As Long = -18&
Public Const GCL_CBCLSEXTRA As Long = -20&
Public Const GCL_STYLE As Long = -26&
Public Const GCL_WNDPROC = (-24)
Public Const GCW_ATOM = (-32)
' Style constants
Public Const WS_OVERLAPPED As Long = &H0&
Public Const WS_TABSTOP As Long = &H10000
Public Const WS_MAXIMIZEBOX As Long = &H10000
Public Const WS_GROUP As Long = &H20000
Public Const WS_MINIMIZEBOX As Long = &H20000
Public Const WS_THICKFRAME As Long = &H40000
Public Const WS_SYSMENU As Long = &H80000
Public Const WS_HSCROLL As Long = &H100000
Public Const WS_VSCROLL As Long = &H200000
Public Const WS_DLGFRAME As Long = &H400000
Public Const WS_BORDER As Long = &H800000
Public Const WS_CAPTION As Long = &HC00000 ' WS_BORDER Or WS_DLGFRAME
Public Const WS_MAXIMIZE As Long = &H1000000
Public Const WS_CLIPCHILDREN As Long = &H2000000
Public Const WS_CLIPSIBLINGS As Long = &H4000000
Public Const WS_DISABLED As Long = &H8000000
Public Const WS_VISIBLE As Long = &H10000000
Public Const WS_MINIMIZE As Long = &H20000000
Public Const WS_CHILD As Long = &H40000000
Public Const WS_POPUP As Long = &H80000000
Public Const CS_VREDRAW As Long = &H1&
Public Const CS_HREDRAW As Long = &H2&
Public Const CS_KEYCVTWINDOW As Long = &H4&
Public Const CS_DBLCLKS As Long = &H8&
Public Const CS_OWNDC As Long = &H20&
Public Const CS_CLASSDC As Long = &H40&
Public Const CS_PARENTDC As Long = &H80&
Public Const CS_NOKEYCVT As Long = &H100&
Public Const CS_NOCLOSE As Long = &H200&
Public Const CS_SAVEBITS As Long = &H800&
Public Const CS_BYTEALIGNCLIENT As Long = &H1000&
Public Const CS_BYTEALIGNWINDOW As Long = &H2000&
Public Const CS_PUBLICCLASS As Long = &H4000&
Public Const GW_HWNDFIRST = 0
Public Const GW_HWNDLAST = 1
Public Const GW_HWNDNEXT As Long = 2&
Public Const GW_HWNDPREV = 3
Public Const GW_OWNER = 4
Public Const GW_CHILD As Long = 5&
Public Const GW_MAX = 5
Public Const ES_LEFT = &H0&
Public Const ES_CENTER = &H1&
Public Const ES_RIGHT = &H2&
Public Const ES_MULTILINE = &H4&
Public Const ES_UPPERCASE = &H8&
Public Const ES_LOWERCASE = &H10&
Public Const ES_PASSWORD = &H20&
Public Const ES_AUTOVSCROLL = &H40&
Public Const ES_AUTOHSCROLL = &H80&
Public Const ES_NOHIDESEL = &H100&
Public Const ES_OEMCONVERT = &H400&
Public Const ES_READONLY = &H800&
Public Const ES_WANTRETURN = &H1000&
Public Const BS_PUSHBUTTON = &H0&
Public Const BS_DEFPUSHBUTTON = &H1&
Public Const BS_CHECKBOX = &H2&
Public Const BS_AUTOCHECKBOX = &H3&
Public Const BS_RADIOBUTTON = &H4&
Public Const BS_3STATE = &H5&
Public Const BS_AUTO3STATE = &H6&
Public Const BS_GROUPBOX = &H7&
Public Const BS_USERBUTTON = &H8&
Public Const BS_AUTORADIOBUTTON = &H9&
Public Const BS_OWNERDRAW = &HB&
Public Const BS_LEFTTEXT = &H20&
' New button styles for Windows 95
Public Const BS_TEXT = 0&
Public Const BS_ICON = &H40&
Public Const BS_BITMAP = &H80&
Public Const BS_LEFT = &H100&
Public Const BS_RIGHT = &H200&
Public Const BS_CENTER = &H300&
Public Const BS_TOP = &H400&
Public Const BS_BOTTOM = &H800&
Public Const BS_VCENTER = &HC00&
Public Const BS_PUSHLIKE = &H1000&
Public Const BS_MULTILINE = &H2000&
Public Const BS_NOTIFY = &H4000&
Public Const BS_FLAT = &H8000&
Public Const BS_RIGHTBUTTON = &H20&
Public Const SS_LEFT = &H0&
Public Const SS_CENTER = &H1&
Public Const SS_RIGHT = &H2&
Public Const SS_ICON = &H3&
Public Const SS_BLACKRECT = &H4&
Public Const SS_GRAYRECT = &H5&
Public Const SS_WHITERECT = &H6&
Public Const SS_BLACKFRAME = &H7&
Public Const SS_GRAYFRAME = &H8&
Public Const SS_WHITEFRAME = &H9&
Public Const SS_USERITEM = &HA&
Public Const SS_SIMPLE = &HB&
Public Const SS_LEFTNOWORDWRAP = &HC&
Public Const SS_NOPREFIX = &H80 ' Don't do "&" character translation
Public Const DS_ABSALIGN = &H1&
Public Const DS_SYSMODAL = &H2&
Public Const DS_LOCALEDIT = &H20
Public Const DS_SETFONT = &H40
Public Const DS_MODALFRAME = &H80
Public Const DS_NOIDLEMSG = &H100
Public Const DS_SETFOREGROUND = &H200
Global Const WM_USER = &H400
' Watch out here - control message numbers have changed!
Public Const LB_RESETCONTENT = &H184
Public Const LB_SETTABSTOPS = &H192
Public Const LBS_NOTIFY = &H1&
Public Const LBS_SORT = &H2&
Public Const LBS_NOREDRAW = &H4&
Public Const LBS_MULTIPLESEL = &H8&
Public Const LBS_OWNERDRAWFIXED = &H10&
Public Const LBS_OWNERDRAWVARIABLE = &H20&
Public Const LBS_HASSTRINGS = &H40&
Public Const LBS_USETABSTOPS = &H80&
Public Const LBS_NOINTEGRALHEIGHT = &H100&
Public Const LBS_MULTICOLUMN = &H200&
Public Const LBS_WANTKEYBOARDINPUT = &H400&
Public Const LBS_EXTENDEDSEL = &H800&
Public Const LBS_DISABLENOSCROLL = &H1000&
Public Const LBS_NODATA = &H2000&
Public Const CBS_SIMPLE = &H1&
Public Const CBS_DROPDOWN = &H2&
Public Const CBS_DROPDOWNLIST = &H3&
Public Const CBS_OWNERDRAWFIXED = &H10&
Public Const CBS_OWNERDRAWVARIABLE = &H20&
Public Const CBS_AUTOHSCROLL = &H40&
Public Const CBS_OEMCONVERT = &H80&
Public Const CBS_SORT = &H100&
Public Const CBS_HASSTRINGS = &H200&
Public Const CBS_NOINTEGRALHEIGHT = &H400&
Public Const CBS_DISABLENOSCROLL = &H800&
Public Const SBS_HORZ = &H0&
Public Const SBS_VERT = &H1&
Public Const SBS_TOPALIGN = &H2&
Public Const SBS_LEFTALIGN = &H2&
Public Const SBS_BOTTOMALIGN = &H4&
Public Const SBS_RIGHTALIGN = &H4&
Public Const SBS_SIZEBOXTOPLEFTALIGN = &H2&
Public Const SBS_SIZEBOXBOTTOMRIGHTALIGN = &H4&
Public Const SBS_SIZEBOX = &H8&
Public Declare Function GetVersionEx Lib "kernel32.dll" _
Alias "GetVersionExA" _
(lpVerInfo As OSVERSIONINFO) As Long
Public Declare Function IsWindowVisible Lib "user32.dll" _
(ByVal hWnd As Long) As Long
Public Declare Function IsWindowEnabled Lib "user32.dll" _
(ByVal hWnd As Long) As Long
Public Declare Function IsZoomed Lib "user32.dll" _
(ByVal hWnd As Long) As Long
Public Declare Function IsIconic Lib "user32.dll" _
(ByVal hWnd As Long) As Long
Public Declare Function GetClientRect Lib "user32.dll" _